﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace LinqExtender.Attributes
{
    /// <summary>
    /// Atttribute class for defining original field name for a property.
    /// </summary>
    [AttributeUsage(AttributeTargets.Property)]
    public class OriginalFieldNameAttribute : System.Attribute
    {
        /// <summary>
        /// Create a new instance of the <see cref="OriginalFieldNameAttribute"/> for a specific field name.
        /// </summary>
        /// <param name="fieldName"></param>
        public OriginalFieldNameAttribute(string fieldName)
        {
            this.fieldName = fieldName;
        }
        /// <summary>
        /// Gets the original field name set by user.
        /// </summary>
        public string FieldName
        {
            get
            {
                return fieldName;
            }
        }

        private readonly string fieldName = string.Empty;
    }
}